<?php 
$cs = Yii::app()->getClientScript();
$cs->registerCssFile('css/reg.log.css');
?>
<div id='login'  class="reg-login ">
<?php $form=$this->beginWidget('CActiveForm', array(
  'id'=>'login-form',
  'enableAjaxValidation'=>true,
  'clientOptions'=>array('validateOnSubmit'=>true, ),
  'focus'=>'input:text[value=""]:first',
  'htmlOptions'=>array('class'=>'reg-login')
)); 


$labels = $model->attributeLabels(); ?>


 <center>
  <table style="width:800px;" align='center'>
    <tr>
      <td>
      <div>
      <?php echo $form->labelEx($model,'username'); ?>
    <?php echo $form->textField($model,'username',array('class'=>'input','label'=>$labels['username'],'autocomplete'=>'off')); ?>
    </div>
    <?php echo $form->error($model,'username'); ?></td>
      <td>
    <div>
    <?php echo $form->labelEx($model,'password'); ?>
    <?php echo $form->passwordField($model,'password',array('class'=>'input','label'=>$labels['password'],'autocomplete'=>'off')); ?>
     </div>
    <?php echo $form->error($model,'password'); ?>
    <?php echo CHtml::link("忘记密码",array('/user/forgotpasswd'),array('class'=>'right'))?>
    </td>

      <td>
    <?php echo CHtml::submitButton('登陆',array('class'=>'button')); ?>
    <br/>
    <?php echo $form->checkBox($model,'rememberMe'); ?>
    <?php echo $form->label($model,'rememberMe'); ?> 
    </td>
      <td>
    <?php echo CHtml::link(CHtml::image(Yii::app ()->request->baseUrl.'/images/sina_login_16.png'),array('/user/wblogin'));?>
    </td>
    </tr>
  
  </table> 
</center> 
 
<?php $this->endWidget(); ?>
</div><!-- form -->
